package com.astar.controller.detail;


import com.astar.entity.CustomChapter;
import com.astar.entity.CustomDetail;
import com.astar.service.ITransactionDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 交易明细记录  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2020-01-31
 */
@Controller
@RequestMapping("/pay")
public class TransactionDetailController {

    @Autowired
    private ITransactionDetailService transactionDetailServiceImpl;

    @RequestMapping("/index")
    public Object toIndex(){

        return "pay/index";
    }

    @RequestMapping("/selectList")
    @ResponseBody
    public Object selectList(CustomChapter customChapter){
       List<CustomDetail> details = transactionDetailServiceImpl.selectAll();
        return details;
    }


}
